<?php
namespace app\admin\controller;
use app\admin\controller\Base;
use think\Cache;
class Index extends Base
{
	public function index()
    {
    	return view();
    }
    public function home()
    {
    	$info = array(
            'web_server' => $_SERVER['SERVER_SOFTWARE'],
            'onload'     => ini_get('upload_max_filesize'),
            'think_v'    => THINK_VERSION,
            'phpversion' => phpversion(),
        );
        $this->assign('info',$info);
    	return view();
    }
    public function clear_cache()
    {
        if (delete_dir_file(CACHE_PATH) || delete_dir_file(TEMP_PATH)) {
            exit(json_encode(array('status' => 'y', 'info' => '清除缓存成功!')));
        } else {
            exit(json_encode(array('status' => 'n', 'info' => '清除缓存失败!')));
        }
    }
}
